﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ETA.IService;
using Ninject;
using NUnit.Framework;

namespace ETA.UnitTest
{
    [TestFixture]
    public class RegistrationEducationTest
    {
        private static IRegistrationEducationService _IRegistrationEducationService { set; get; }


        [SetUp]
        public void Init()
        {
            IKernel kernel = new StandardKernel(new NinjectModuleBuild());
            _IRegistrationEducationService = kernel.Get<IRegistrationEducationService>();
        }

        [Test]
        public void AddEducation()
        {
            var req = new CreateRegistrationEducationRequest
            {
                RegistrationEducation = new Entity.RegistrationEducation
                {
                    EndDate = DateTime.Parse("2010-07-01"),
                    Major = "软件工程",
                    School = "盐城工学院",
                    StartDate = DateTime.Parse("2006-09-01"),
                    RegistrationMainFormId = "44495e72-28bf-4c17-bae8-01420842995f",
                    RegistrationEducationId = Guid.NewGuid() + ""
                }
            };
            var res = _IRegistrationEducationService.CreateRegistrationEducation(req);
            Assert.True(res.Result.IsSuccess);
        }
    }
}
